package com.future.controller;

import java.io.File;

import com.future.common.annotation.ControllerMapping;
import com.future.common.annotation.NoNeedLogin;
import com.future.common.base.BaseController;
import com.jfinal.upload.UploadFile;
/**
 * 文件上传
 * @author ThinkPad
 *
 */
@ControllerMapping("/fileupload")
@NoNeedLogin
public class FiluploadController extends BaseController {
	public void fileupload(){
		UploadFile file = getFile();
		String filename = file.getFileName();
		renderResult("path", filename);
	}
	
	public void showfile(String path){
		renderFile(new File("c:\\tdupload\\"+path));
	}
}
